/*
 * @Author: hashMi 854059946@qq.com
 * @Date: 2023-10-28 11:34:49
 * @LastEditors: hashMi 854059946@qq.com
 * @LastEditTime: 2023-10-29 10:34:13
 * @FilePath: /guiguzhenxuan/src/api/user/index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// /*
//  * @Author: hashMi 854059946@qq.com
//  * @Date: 2023-10-28 11:34:55
//  * @LastEditors: hashMi 854059946@qq.com
//  * @LastEditTime: 2023-10-28 11:38:39
//  * @FilePath: /guiguzhenxuan/src/api/user/type.ts
//  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
//  */
// //统一管理咱们项目用户相关的接口

import request from '@/utils/request'

import type {
  loginFormData,
  loginResponseData,
  userInfoResponseData,
} from './type'

//项目用户相关的请求地址

//项目用户相关的请求地址
enum API {
  LOGIN_URL = '/admin/acl/index/login',
  USERINFO_URL = '/admin/acl/index/info',
  LOGOUT_URL = '/admin/acl/index/logout',
}

//登录接口
export const reqLogin = (data: loginFormData) =>
  request.post<any, loginResponseData>(API.LOGIN_URL, data)
//获取用户信息
export const reqUserInfo = () =>
  request.get<any, userInfoResponseData>(API.USERINFO_URL)
//退出登录
export const reqLogout = () => request.post<any, any>(API.LOGOUT_URL)
